import Vue from 'vue'
import Vuex from 'vuex'
import * as actions from './actions'
import home from './modules/home'
import mall from './modules/mall'
import cart from './modules/cart'
import productDetail from './modules/productDetail'
import allCategory from './modules/allCategory'
import subject from './modules/subject'
import * as getters from './getters'
import createLogger from '../../plugins/logger'



Vue.use(Vuex)

const debug = process.env.NODE_ENV !== 'production'


export default new Vuex.Store({
  actions,
  getters,
  modules: {
    home,
    mall,
    productDetail,
    cart,
    subject,
    allCategory
  },
  strict: debug,
  plugins: debug ? [createLogger()] : []
})
